package com.ruoyi.db.system.domain;

import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.ruoyi.framework.web.domain.BaseEntity;

/**
 * 菜单权限表 sys_menu
 *
 * @author ruoyi
 */
@ApiModel("菜单权限表实体类")
@Data
@EqualsAndHashCode(callSuper = true)
public class SysMenu extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("菜单ID")
    private Long menuId;

    @ApiModelProperty("菜单名称")
    @NotBlank(message = "菜单名称不能为空")
    @Size(min = 0, max = 50, message = "菜单名称长度不能超过50个字符")
    private String menuName;

    @ApiModelProperty("父菜单名称")
    private String parentName;

    @ApiModelProperty("父菜单ID")
    private Long parentId;

    @ApiModelProperty("显示顺序")
    @NotBlank(message = "显示顺序不能为空")
    private String orderNum;

    @ApiModelProperty("路由地址")
    @Size(min = 0, max = 200, message = "路由地址不能超过200个字符")
    private String path;

    @ApiModelProperty("组件路径")
    @Size(min = 0, max = 200, message = "组件路径不能超过255个字符")
    private String component;

    @ApiModelProperty("是否为外链（0是 1否）")
    private String isFrame;

    @ApiModelProperty("类型（M目录 C菜单 F按钮）")
    @NotBlank(message = "菜单类型不能为空")
    private String menuType;

    @ApiModelProperty("单状态:0显示,1隐藏")
    private String visible;

    @ApiModelProperty("权限字符串")
    @Size(min = 0, max = 100, message = "权限标识长度不能超过100个字符")
    private String perms;

    @ApiModelProperty("菜单图标")
    private String icon;

    @ApiModelProperty("子菜单集合")
    private List<SysMenu> children = new ArrayList<SysMenu>();
}
